<div id="maincontent">
	<div id="content">
    
    <h2><?php echo lico_lang('editpref', 'page.title'); ?></h2>
    
    <div class="box1">
      <h1><?php echo lico_lang('editpref', 'box1.title'); ?></h1>
      <div class="description"><?php echo lico_lang('editpref', 'box1.description'); ?></div>
      
      
      
<?php

$lico['timezones'][] = array("-12.00" => "UTC-12:00 (BIT) Baker Island, Howland Island (both uninhabited)");
$lico['timezones'][] = array("-11.00" => "UTC-11:00 (SST) American Samoa, Samoa");
$lico['timezones'][] = array("-10.00" => "UTC-10:00 (TAHT, HST, HAST, CKT) French Polynesia (most), United States (Aleutian Islands, Hawaii)");
$lico['timezones'][] = array("-9.50" => "UTC-09:30 (MIT) Marquesas Islands");
$lico['timezones'][] = array("-9.00" => "UTC-09:00 (GIT, AKST, HADT) Gambier Islands, United States (most of Alaska)");
$lico['timezones'][] = array("-8.00" => "UTC-08:00 (PST, AKDT, CIST) Canada (most of British Columbia), Mexico (Baja California), United States (California, most of Nevada, most ofOregon, Washington (state))");
$lico['timezones'][] = array("-7.00" => "UTC-07:00 (PDT, MST) Mexico (Sonora), United States (Arizona), Canada (Alberta), Mexico (Chihuahua), United States (Colorado)");
$lico['timezones'][] = array("-6.00" => "UTC-06:00 (MDT, CST, EAST, EAST, GALT) Costa Rica, El Salvador, Ecuador (Galápagos Islands), Guatemala,Honduras, Mexico (most), Nicaragua, Canada (Manitoba, Saskatchewan), United States (Illinois, most of Texas)");
$lico['timezones'][] = array("-5.00" => "UTC-05:00 (CDT, COT, ECT, EST) Colombia, Cuba, Ecuador (continental), Haiti, Jamaica, Panama, Peru, Canada (most of Ontario, most of Quebec), United States (most of Florida, Georgia, Massachusetts, most ofMichigan, New York, North Carolina, Ohio, Washington D.C.)");
$lico['timezones'][] = array("-4.50" => "UTC-04:30 (VET) Venezuela");
$lico['timezones'][] = array("-4.00" => "UTC-04:00 (EDT, GYT, AST, ECT, BOT, FKT, CLT) Bolivia, Brazil (Amazonas), Chile (continental), Dominican Republic,Canada (Nova Scotia), Paraguay, Puerto Rico, Trinidad and Tobago");
$lico['timezones'][] = array("-3.50" => "UTC-03:30 (NST, NT) Canada (Newfoundland)");
$lico['timezones'][] = array("-3.00" => "UTC-03:00 (BRT, GFT, ART, UYT, ADT) Argentina, Brazil (Brasília, Rio de Janeiro, São Paulo), most of Greenland, Uruguay");
$lico['timezones'][] = array("-2.00" => "UTC-02:00 (GST) Brazil (Fernando de Noronha), South Georgia and the South Sandwich Islands");
$lico['timezones'][] = array("-1.00" => "UTC-01:00 (CVT, AZOST) Portugal (Azores), Cape Verde");
$lico['timezones'][] = array("0" => "UTC±00:00 (UTC, GMT) Côte d'Ivoire, Faroe Islands, Ghana, Iceland, Senegal, Ireland, Portugal (continental and Madeira), Spain (Canary Islands), Morocco, United Kingdom");
$lico['timezones'][] = array("1.00" => "UTC+01:00 (DFT, WAT, CET) Angola, Cameroon, Nigeria, Tunisia, Albania, Algeria, Austria, Belgium, Bosnia and Herzegovina, Spain (continental), Croatia, Czech Republic,Denmark, Germany, Hungary, Italy, Kinshasa, Kosovo, Macedonia, France (metropolitan), the Netherlands,Norway, Poland, Serbia, Slovakia, Slovenia, Sweden, Switzerland");
$lico['timezones'][] = array("2.00" => "UTC+02:00 (SAST, MET, IST, HAEC, MEST, CEST, EET, CAT) Libya, Egypt, Malawi, Mozambique, South Africa, Zambia, Zimbabwe, Bulgaria, Cyprus, Estonia, Finland, Greece, Israel, Jordan, Latvia, Lebanon, Lithuania, Moldova, Palestine,Romania, Syria, Turkey, Ukraine");
$lico['timezones'][] = array("3.00" => "UTC+03:00 (AST, EAT, AST, MSK) Belarus, Djibouti, Eritrea, Ethiopia, Iraq, Kenya, Madagascar, Russia (Kaliningrad Oblast), Saudi Arabia, South Sudan, Sudan, Somalia, South Sudan, Tanzania, Uganda, Yemen");
$lico['timezones'][] = array("3.50" => "UTC+03:30 (IRST) Iran");
$lico['timezones'][] = array("4.00" => "UTC+04:00 (AMT, AST, AZT, MUT, GST, SCT, RET, SAMT, GET) Armenia, Azerbaijan, Georgia, Mauritius, Oman, Russia (European),Seychelles, United Arab Emirates");
$lico['timezones'][] = array("4.50" => "UTC+04:30 (AFT) Afghanistan");
$lico['timezones'][] = array("5.00" => "UTC+05:00 (YEKT, PKT, HMT) Kazakhstan (West), Maldives, Pakistan, Uzbekistan");
$lico['timezones'][] = array("5.50" => "UTC+05:30 (IST, SLT) India, Sri Lanka");
$lico['timezones'][] = array("5.75" => "UTC+05:45 (NPT) Nepal");
$lico['timezones'][] = array("6.00" => "UTC+06:00 (BIOT, BST, BTT, OMST) Kazakhstan (most), Bangladesh, Russia (Ural: Sverdlovsk Oblast,Chelyabinsk Oblast)");
$lico['timezones'][] = array("6.50" => "UTC+06:30 (CCT, MST) Cocos Islands, Myanmar");
$lico['timezones'][] = array("7.00" => "UTC+07:00 (THA, KRAT, ICT, CXT) Jakarta, Russia (Novosibirsk Oblast), Thailand, Vietnam");
$lico['timezones'][] = array("8.00" => "UTC+08:00 (IRKT, MYT, SGT, WST, CST, PST, HKT, ACT, MST, CT, AWST, BDT, SST) China, Hong Kong, Russia (Krasnoyarsk Krai), Malaysia, Philippines,Singapore, Taiwan, most of Mongolia, Western Australia");
$lico['timezones'][] = array("9.00" => "UTC+09:00 (JST, KST, YAKT) East Timor, Russia (Irkutsk Oblast), Japan, North Korea, South Korea");
$lico['timezones'][] = array("9.50" => "UTC+09:30 (ACST, CST) Australia (Northern Territory), Australia (South Australia)");
$lico['timezones'][] = array("10.00" => "UTC+10:00 (VLAT, AEST, CHST) Russia (Zabaykalsky Krai), Australia (New South Wales, Queensland, Tasmania, Victoria)");
$lico['timezones'][] = array("10.50" => "UTC+10:30 (LHST) Lord Howe Island");
$lico['timezones'][] = array("11.00" => "UTC+11:00 (MAGT, SBT) New Caledonia, Russia (Primorsky Krai), Solomon Islands");
$lico['timezones'][] = array("11.50" => "UTC+11:30 (NFT) Norfolk Island");
$lico['timezones'][] = array("12.00" => "UTC+12:00 (PETT, GILT, FJT, NZST) Fiji, Russia (Kamchatka Krai), New Zealand");
$lico['timezones'][] = array("12.75" => "UTC+12:45 (CHAST) Chatham Islands");
$lico['timezones'][] = array("13.00" => "UTC+13:00 (PHOT) Tonga");
$lico['timezones'][] = array("14.00" => "UTC+14:00 (LINT) Kiribati (Line Islands)");




  $selup = "SELECT * FROM `user_pref` WHERE `f_key`='".lico_ESC($_SESSION['userid'])."'";
	$retup = $db->getAll_assoc($selup);
	if (count($retup) >= 1) {
		for ($cup=0; $cup<count($retup); $cup++) {
			$variable = trim($retup[$cup]['variable']);
			$value    = trim($retup[$cup]['value']);
			if (is_numeric($value)) {
			  $value = intval($value);
	    } else {
	      $value = trim(stripslashes($value));
      }
			$lico['user'][$variable] = $value;
		}
	}
  if (!isset($lico['user']['timezone'])   || trim($lico['user']['timezone']) == "")   { $lico['user']['timezone'] = 0; }
  if (!isset($lico['user']['dateformat']) || trim($lico['user']['dateformat']) == "") { $lico['user']['dateformat'] = "d/m/Y"; }
  if (!isset($lico['user']['timeformat']) || trim($lico['user']['timeformat']) == "") { $lico['user']['timeformat'] = "h:ia"; }
  
  $out .= "     <form name=\"editpref\" action=\"/success.html\" method=\"post\">\n";
  $out .= "       <div class=\"formitem even\">\n";
  $out .= "         <label class=\"formlabel\">".lico_lang('editpref', 'timezone').":</label>\n";
  $out .= "         <span class=\"forminput\">\n";
  $out .= "           <select class=\"formselect\" name=\"lico[timezone]\">\n";
  for($tz=0; $tz<count($lico['timezones']); $tz++) {
    foreach($lico['timezones'][$tz] AS $optvalue => $optname) {
      if ((float)$optvalue == (float)$lico['user']['timezone']) {
        $out .= "             <option value=\"".$optvalue."\" selected=\"selected\">".htmlspecialchars($optname)."</option>\n";
      } else {
        $out .= "             <option value=\"".$optvalue."\">".htmlspecialchars($optname)."</option>\n";
      }
    }
  }
  $out .= "           </select> &nbsp;\n";
  $out .= "         </span>\n";
  $out .= "       </div>\n";
  $out .= "       <div class=\"formitem odd\">\n";
  $out .= "         <label class=\"formlabel\">".lico_lang('editpref', 'dateformat').":</label>\n";
  $out .= "         <span class=\"forminput\"><input type=\"text\" name=\"lico[dateformat]\" value=\"".trim($lico['user']['dateformat'])."\"/></span>\n";
  $out .= "       </div>\n";
  
  $out .= "       <div class=\"formitem even\">\n";
  $out .= "         <label class=\"formlabel\">".lico_lang('editpref', 'timeformat').":</label>\n";
  $out .= "         <span class=\"forminput\"><input type=\"text\" name=\"lico[timeformat]\" value=\"".trim($lico['user']['timeformat'])."\"/></span>\n";
  $out .= "       </div>\n";
    
  $out .= "       <div class=\"formsubmit formitem\">\n";
  $out .= "         <input type=\"hidden\" name=\"lico[action]\" value=\"setprefs\"/>\n";
  $out .= "         <span class=\"formsubmit-button\"><input type=\"submit\" name=\"lico[submit]\" value=\"".lico_lang('profile', 'save.data')."\"/></span>\n";
  $out .= "       </div>\n";
  $out .= "     </form>\n";
  echo $out;



?>
      
      
      
    </div>
    
  </div>
</div>
